package com.module.sysconfig.service.impl;

import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.module.sysconfig.dao.TpfpzbMapper;
import com.module.sysconfig.service.TpfpzbService;
import com.support.cache.annotation.CacheEvict;
import com.support.cache.annotation.Cacheable;
import com.support.cache.annotation.KeyMode;
import com.support.jdbc.Page;

@Service
public class TpfpzbServiceImpl implements TpfpzbService 
{

	@Autowired
	public TpfpzbMapper tpfpzbMapper;
	
	/**
	 * 保存通配符配置表数据
	 */
	@CacheEvict(key="ALL_TPFPZB_RECORD")
	public void saveTpfpzb(Map<String, String> params) 
	{
		tpfpzbMapper.saveTpfpzb(params);
	}

	/**
	 * 修改通配符配置表数据
	 */
	@CacheEvict(key="ALL_TPFPZB_RECORD")
	public void updateTpfpzb(Map<String, String> params) 
	{
		tpfpzbMapper.updateTpfpzb(params);
	}

	/**
	 * 删除通配符配置表数据
	 */
	@CacheEvict(key="ALL_TPFPZB_RECORD")
	public void deleteTpfpzb(Long id) 
	{
		tpfpzbMapper.deleteTpfpzb(id);
	}

	/**
	 * 查询通配符配置表数据
	 */
	@SuppressWarnings({"unchecked","rawtypes"})
	@Cacheable(key="ALL_TPFPZB_RECORD", keyMode=KeyMode.ALL,expire = 10)
	public Page queryTpfpzbRecord(Page page) {
		page.setResults(tpfpzbMapper.queryTpfpzbRecord(page));
		return page;
	}

}
